//2009/08/15 23:17:40
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <math.h>
#include <sstream>
#include <algorithm>

using namespace std;

class MassiveNumbers
{
public:
    string getLargest(string numberA, string numberB)
    {
		int a,b,c,d; char ch;
		stringstream s1(numberA);
		s1 >> a >> ch >> b;
		stringstream s2(numberB);
		s2 >> c >> ch >> d;
		if(b*log(1.0*a) > d*log(1.0*c)) return numberA;
		return numberB;
    }
};
